const { DataTypes } = require('sequelize');
const sequelize = require('../config/database')

const HotelReservationModel = sequelize.define('HotelReservation', {
  h_reservation_id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
    allowNull: false
  },
  hotel_id: {
    type: DataTypes.INTEGER,
    allowNull: false
  },
  room_type: {
    type: DataTypes.ENUM('大床房', '双床房', '豪华大床房'),
    allowNull: false
  },
  room_price: {
    type: DataTypes.DECIMAL(10, 2),
    allowNull: false
  },
  description: {
    type: DataTypes.TEXT,
    allowNull: false
  }
}, {
  freezeTableName: true,
  tableName: 'hotel_reservation',
  timestamps: false
})

module.exports = HotelReservationModel